package com.itcast.n1_base2;//package com.itheima.jvm.chapter02.classloader.arthas;

import jdk.nashorn.internal.runtime.ScriptEnvironment;

import java.io.IOException;

/**
 * 扩展类加载器
 * -Djava.ext.dirs=D:\Java\jdk1.8.0_45\jre\lib\ext;E:\code\flyduck-note\heima-jvm\chapter01\src\main\java\com\itcast\n1_base2
 */
public class Test5_验证扩展类加载器加载用户自定义类 {
    public static void main(String[] args) throws Exception {

        Class<?> clazz = Class.forName("com.itheima.my.A");
        System.out.println(clazz);
        ClassLoader classLoader = clazz.getClassLoader();
        System.out.println("classLoader = " + classLoader);

        ClassLoader classLoader1 = ScriptEnvironment.class.getClassLoader();
        System.out.println(classLoader1);//sun.misc.Launcher$ExtClassLoader@6a38e57f
    }
}
